﻿// -------------------------------------------------------------------------
//    @FileName         :    NFCityPlayerTeamExt.h
//    @Author           :    Gao.Yi
//    @Date             :    2025-09-15
//    @Email			:    445267987@qq.com
//    @Module           :    NFCityPlayerTeamExt
//    @Desc             :
//
// -------------------------------------------------------------------------

#pragma once
#include "proto_city.nanopb.h"

class NFCityPlayer;

class NFCityPlayerTeamExt
{
public:
    NFCityPlayerTeamExt();
    ~NFCityPlayerTeamExt();
    int CreateInit();
    int ResumeInit();

public:
    int InitTeamData(const proto_ff::CityTeamData* pTeamData);
    bool IsTeamFollow(uint64_t ullRoleId);
    bool IsTeamLeader(uint64_t ullRoleId);
    bool IsInTeam(uint64_t ullRoleId);
    int32_t GetTeamMemberNum();
    int32_t GetSize() { return m_stTeamData.team_member.size(); }

    NFCityPlayer* GetLeader();
    CityTeamData* GetTeamData() { return &m_stTeamData; }
    CityTeamMember* GetTeamMember(uint64_t ullRoleId);
private:
    CityTeamData m_stTeamData;
};
